<template>
  <!-- 小弹框 width:500,height:0.3,top:15%  -->
  <!-- 中弹框 width:800,height:0.5,top:10% -->
  <!-- 大弹框 width:1060,height:0.76,top:5% -->

  <div class="Control-1 mechanism_dialogS closure closuredc"  id="comcn small">
    <el-dialog
      width="100%"
      :title="title"
      v-loading="loading"
      element-loading-text="拼命加载中"
      element-loading-background="rgba(0, 0, 0, 0.2)"
      element-loading-spinner="el-icon-loading"
      
      :visible.sync="visible"
      @close="closeDialog"
      :append-to-body="true"
      top="0%"
    >
      <div
        class="dialogBody common commonClassDialog dialogMachine"
        :style="{ height: dialogHeight }"
        style="width: 100%"
      >
        <div class="reportTab">
          <div class="tab">
            <div
              v-for="(data, index) in typeData"
              :key="data.value"
              @click="changeType($event, index)"
            >
              <div
                class="btn"
                :style="{
                  color:
                    data.show === true ? 'rgba(0, 117, 255, 1)' : '#343639',
                  background: data.show === true ? '#E0EFFF' : '#fff',
                }"
              >
                {{ data.text }}
              </div>
            </div>
          </div>
        </div>

        <div class="recordMachine" v-show="typeData[0].show">
          <div class="reportTitle" v-if="formData != null">
            <div class="reportTitleContent">
              <div class="bigTitle">{{ formData.fProjectfullname }}</div>
              <div class="samllTitle">混凝土强度试验检测记录表(回弹法)</div>
            </div>
            <div class="reportTitleFir">
              <div class="left">
                <div class="name">试验室名称：</div>
                <div class="lable">{{ formData.fCompanyfullname }}</div>
              </div>
              <div class="right">记录编号：{{ formData.fMarkno }}</div>
            </div>
          </div>

          <div class="reportContent">
            <div class="regular">
              <div
                class="reportTr"
                :style="{ width: item.row }"
                v-for="item in recordTableObj"
                :key="item.lable"
              >
                <div
                  class="reportTrLable"
                  :style="{
                    flex: item.type == 2 ? '20%' : item.type == 3 ? '33%' : '',
                  }"
                >
                  {{ item.lable }}
                </div>
                <div
                  class="reportTrValue"
                  v-if="formData != null"
                  :style="{ flex: item.type == 2 ? '20%' : '' }"
                >
                  <div v-if="item.type == 1" class="sampleInfo">
                    制件日期：<el-date-picker
                      style="width: 120px"
                      v-model="formData.fSampledates"
                      type="date"
                      :disabled="sgDisabled"
                      placeholder="选择日期"
                      format="yyyy年MM月dd日"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                    ;样品编号{{ formData.fSamplingno }}
                  </div>
                  <!-- <el-input
                    type="text"
                   
                    placeholder="请选择"
                    v-model="item.key"
                    :disabled="sgDisabled"
                    @change="selectChange($event, 3)"
                  /> -->
                  <div v-else>{{ item.key }}</div>
                </div>
              </div>
            </div>
            <div class="contentTable">
              <div class="contentTableLeft">
                <!-- @row-click="handleCellClick" -->
                <el-table
                  :cell-class-name="tableRowClassName"
                  :data="contentTableLeft"
                  style="width: 100%"
                >
                  <el-table-column
                    label="测点测区"
                    width="57"
                    align="center"
                    prop="fOrder"
                  >
                  </el-table-column>
                  <el-table-column label="实测回弹值">
                    <el-table-column
                      align="center"
                      v-for="(item, index) in contentTableLeftArr"
                      :key="index"
                      :prop="'fParam' + (index + 1)"
                      :label="item"
                      width="56"
                    >
                      <template slot-scope="scope">
                        <div
                          style="
                            color: #409eff;
                            display: flex;
                            justify-content: center;
                          "
                        >
                          <!--  type="number" -->
                          <el-input
                            :ref="scope.$index + 'fParam' + scope.column.index"
                            placeholder="/"
                            @keyup.native="
                              moveFocus(
                                $event,
                                scope.$index,
                                scope.column.index
                              )
                            "
                            @input="getInfoData($event, scope.$index)"
                            :disabled="
                              item == 'Rm' || sgDisabled ? true : false
                            "
                            v-model="scope.row['fParam' + (index + 1)]"
                          >
                          </el-input>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>
                </el-table>
              </div>
              <div class="contentTableRight">
                <div class="title">
                  <div
                    class="titleData"
                    v-for="(item, index) in titleData"
                    :key="index"
                  >
                    {{ item }}
                  </div>
                </div>
                <div class="contentTableRightContent">
                  <div
                    class="arrange"
                    v-for="(item, index) in contentTableResultData"
                    :key="index"
                  >
                    <div class="line" v-for="(i, v) in arrange" :key="v">
                      <div class="type1" v-if="index == 0">
                        <el-select
                          v-model="item[i]"
                          @change="selectAngles"
                          placeholder="/"
                          :disabled="sgDisabled"
                        >
                          <el-option
                            :label="item.label"
                            :value="item.label"
                            v-for="(item, index) in carbonationData"
                            :key="index"
                          ></el-option>
                        </el-select>
                      </div>

                      <div class="type2" v-else>
                        <el-input
                          :disabled="true"
                          placeholder="/"
                          v-model="item[i]"
                        ></el-input>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="regular" style="border-top: 1px solid #000">
              <div
                class="reportTr"
                :style="{ width: item.row }"
                v-for="item in recordTableBottomObj"
                :key="item.lable"
              >
                <div
                  class="reportTrLable"
                  :style="{
                    flex: item.type == 4 ? '21%' : '',
                  }"
                >
                  {{ item.lable }}
                </div>
                <div
                  class="reportTrValue"
                  :style="{ flex: item.type == 2 ? '20%' : '' }"
                >
                  <div>{{ item.key }}</div>
                </div>
              </div>
            </div>
            <div class="note">
              <div class="left">
                <div class="name">附加说明：</div>
                <div class="lable" v-if="formData != null">
                  <el-input
                    type="textarea"
                    rows="2"
                    resize="none"
                    :disabled="sgDisabled"
                    v-model="formData.fNote"
                  ></el-input>
                </div>
              </div>
              <div class="right">
                <div class="name">
                  <div class="jlnoteName">监理意见：</div>
                  <div class="jlnoteLable" v-if="jlformData != null">
                    {{ jlformData.fJlcheckusername }}
                    <!-- <el-input
                      type="textarea"
                      rows="1"
                      resize="none"
                      v-model="jlformData.fJlchecknote"
                      :disabled="jlDisabled"
                    ></el-input> -->
                  </div>
                </div>
                <div class="lable" v-if="jlformData != null">
                  <div class="placeholder"></div>
                  <div class="jlengineer">
                    监理工程师：{{ jlformData.fJlcheckusername }}
                  </div>

                  <div class="time">
                    日期：
                    <div class="jltime">
                      <el-date-picker
                        style="width: 120px"
                        :disabled="jlDisabled"
                        v-model="jlformData.fJlcheckdates"
                        type="date"
                        format="yyyy年MM月dd日"
                        value-format="yyyy-MM-dd"
                        placeholder=""
                      >
                      </el-date-picker>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="sgSign" v-if="formData != null">
            <div>检测：{{ formData.fTestusername }}</div>
            <div>记录：{{ formData.fRecordusername }}</div>
            <div>复核：{{ formData.fCheckusername }}</div>
            <!-- <div class="select">
              <div class="name">记录：{{ formData.fRecordusername }}</div>
              <el-select
                v-model="formData.fRecordusername"
                @change="selectChange($event, 0)"
                placeholder="/"
                :disabled="perDisabled"
              >
                <el-option
                  :label="item.label"
                  :value="item"
                  v-for="(item, index) in personList"
                  :key="index"
                ></el-option>
              </el-select>
            </div>
            <div class="select">
              <div class="name">复核：{{ formData.fCheckusername }}</div>
              <el-select
                v-model="formData.fCheckusername"
                @change="selectChange($event, 1)"
                placeholder="/"
                :disabled="perDisabled"
              >
                <el-option
                  :label="item.label"
                  :value="item"
                  v-for="(item, index) in personList"
                  :key="index"
                ></el-option>
              </el-select>
            </div> -->

            <div class="time">
              <div class="lable">日期：</div>
              <div class="timeer">
                <!-- {{ formData.fRecorddates }} -->
                <el-date-picker
                  v-model="formData.fRecorddates"
                  type="date"
                  :disabled="sgDisabled"
                  format="yyyy年MM月dd日"
                  value-format="yyyy-MM-dd"
                  placeholder="选择日期"
                >
                </el-date-picker>
              </div>
            </div>
            <!-- <div class="time">日期：{{ formData.fRecorddates }}</div> -->
          </div>
        </div>
        <div
          class="reportMachine"
          v-show="typeData[1].show"
          style="margin-top: 90px !important"
        >
          <div class="reportTitle" v-if="formData != null">
            <div class="reportTitleContent">
              <div class="bigTitle">{{ formData.fProjectfullname }}</div>
              <div class="samllTitle">混凝土强度试验检测报告(回弹法)</div>
            </div>
            <div class="reportTitleFir">
              <div class="left">
                <div class="name">试验室名称：</div>
                <!-- <div class="lable">混凝土强度试验检测记录表(回弹法)混凝土强度试验检测记录表(回弹法)</div> -->
                <div class="lable">{{ formData.fCompanyfullname }}</div>
              </div>
              <div class="right">报告编号：{{ formData.fReportno }}</div>
            </div>
          </div>
          <div class="reportContent">
            <div class="regular">
              <div
                class="reportTr"
                :style="{ width: item.row }"
                v-for="item in reportTableObj"
                :key="item.lable"
              >
                <div
                  class="reportTrLable"
                  :style="{
                    flex: item.type == 2 ? '22%' : item.type == 3 ? '25%' : '',
                  }"
                >
                  {{ item.lable }}
                </div>
                <div
                  class="reportTrValue"
                  v-if="formData != null"
                  :style="{
                    flex:
                      item.type == 3
                        ? '25%'
                        : item.type == 2
                        ? '10%'
                        : item.type == 4
                        ? '10%'
                        : '',
                  }"
                >
                  <div v-if="item.type == 1" class="sampleInfo">
                    制件日期：<el-date-picker
                      style="width: 120px"
                      v-model="formData.fSampledates"
                      type="date"
                      :disabled="sgDisabled"
                      placeholder="选择日期"
                      format="yyyy年MM月dd日"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                    ;样品编号{{ formData.fSamplingno }}
                  </div>

                  <div v-else>{{ item.key }}</div>
                </div>
              </div>
            </div>
            <div class="contentTable">
              <div class="reportTitles">
                <div class="projectNmae">项目</div>
                <div class="surveyArea">测区号</div>
                <div
                  class="point"
                  v-for="(item, index) in contentTableResult"
                  :key="index"
                >
                  {{ item }}
                </div>
              </div>
              <div class="reportContents">
                <div class="left">
                  <div class="regular">
                    <div class="projectNmae">回弹值</div>
                    <div class="surveyAreaBox">
                      <div
                        class="surveyArea"
                        v-for="(item, index) in reportData"
                        :key="index"
                      >
                        {{ item }}
                      </div>
                    </div>
                  </div>
                  <div class="conversion">
                    测区混凝土换算强度(Mpa)
                    <!-- <div class="left">测区混凝土换算强度(Mpa)</div>
                    <div class="right"></div> -->
                  </div>
                </div>
                <div class="right">
                  <div
                    class="line"
                    v-for="(item, index) in reportResultData"
                    :key="index"
                  >
                    <div class="arrange" v-for="(i, v) in arrange" :key="v">
                      <div class="type">
                        <el-input
                          :disabled="true"
                          placeholder="/"
                          v-model="item[i]"
                        ></el-input>
                      </div>
                    </div>
                  </div>
                </div>
                <!--  -->
              </div>
              <div class="regular" style="border-top: 1px solid #000">
                <div
                  class="reportTr"
                  :style="{ width: item.row }"
                  v-for="item in reportTableBottomObj"
                  :key="item.lable"
                >
                  <div
                    class="reportTrLable"
                    :style="{
                      flex:
                        item.type == 3 ? '50.8%' : item.type == 2 ? '25%' : '',
                      width:
                        item.type == 4 ? '92px' : item.type == 5 ? '138px' : '',
                    }"
                  >
                    {{ item.lable }}
                  </div>
                  <!-- :style="{ flex: item.type == 4?'30%':'' }" -->
                  <div class="reportTrValue">
                    <div>
                      {{ item.key }}
                      <!-- <el-input v-model="item.key"></el-input> -->
                    </div>
                  </div>
                </div>
                <div class="reportBottom">
                  <div class="blank">/</div>
                  <div class="reportConclusion" v-if="formData != null">
                    <!-- 检测结论：{{ formData.fTestresult }} -->
                    <!-- nian -->
                    <div class="reportConclusion_text">检测结论：</div>
                    <el-input
                      type="textarea"
                      v-model="formData.fTestresult"
                    ></el-input>
                    <!-- nian -->
                  </div>
                </div>
              </div>
            </div>
            <div class="note" style="border-top: 1px solid #000; height: 80px">
              <div class="left" style="height: 100%">
                <div class="name">附加说明：</div>
                <div class="lable" v-if="formData != null">
                  <el-input
                    type="textarea"
                    rows="3"
                    resize="none"
                    v-model="formData.fNote"
                    :disabled="sgDisabled"
                  ></el-input>
                </div>
              </div>
              <div class="right" style="height: 100%">
                <div class="name">
                  <div class="jlnoteName">监理意见：</div>

                  <div class="jlnoteLable" v-if="jlformData != null">
                    {{ jlformData.fJlcheckusername }}
                    <!-- <el-input
                      type="textarea"
                      rows="2"
                      resize="none"
                      v-model="jlformData.fJlchecknote"
                      :disabled="jlDisabled"
                    ></el-input> -->
                  </div>
                </div>
                <div class="lable" v-if="jlformData != null">
                  <div class="jlengineer" style="flex: 4">
                    监理工程师：{{ jlformData.fJlcheckusername }}
                  </div>
                  <!-- <div class="jltime" style="flex: 2">
                    {{ jlformData.fJlcheckdates }}
                  </div> -->

                  <div class="time">
                    日期：
                    <div class="jltime">
                      <el-date-picker
                        style="width: 120px"
                        v-model="jlformData.fJlcheckdates"
                        type="date"
                        :disabled="jlDisabled"
                        format="yyyy年MM月dd日"
                        value-format="yyyy-MM-dd"
                        placeholder=""
                      >
                      </el-date-picker>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="sgSign" style="width: 88%" v-if="formData != null">
            <div>检测：{{ formData.fTestusername }}</div>
            <div>记录：{{ formData.fRecordername }}</div>
            <div>复核：{{ formData.fRecheckername }}</div>
            <div class="time">
              <div class="lable">日期：</div>
              <div class="timeer">
                <!-- {{ formData.fRecorddates }} -->
                <el-date-picker
                  v-model="formData.fRecorddates"
                  type="date"
                  :disabled="sgDisabled"
                  format="yyyy年MM月dd日"
                  value-format="yyyy-MM-dd"
                  placeholder="选择日期"
                >
                </el-date-picker>
              </div>
            </div>
          </div>
        </div>

        <div
          class="recordMachine"
          style="height: 80%; margin: 0 0 50px 0 !important"
          v-show="typeData[2].show"
        >
          <div class="tableInfo">
            <tableData
              height="100%"
              width="100%"
              :config="table_config"
              :currentRow="false"
              :dataList="tableData"
              :loading="loading"
              placeholderText=""
              @inputValue="inputValue"
              statusType="1"
            />
          </div>
        </div>

        <div
          class="newlyAdded_btn"
          style="top: 38px; bottom: 0px"
          v-if="btnShow"
        >
          <el-button :disabled="isLock" type="primary" @click="yj_saveForm(0)"
            >保存</el-button
          >
          <el-button type="warning" @click="visible = false">关闭</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script src="./index.js"></script>
<style lang="less" scoped>
@import "./index.less";
</style>
